package org.dyz.banana.platform.exceptions;

import org.dyz.banana.platform.common.vo.HttpResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class UaaExceptionHandler {

	@ExceptionHandler(value= Exception.class)
	@ResponseBody
	public HttpResult handler(Exception e) {
		return HttpResult.error(e.getMessage());
	}
}
